﻿using OA.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OA.BLL
{
    public class CPosition : CBase
    {
        public static Position GetPositionByID(int id,List<Position> list)
        {
            Position info = list.Where(m => m.ID == id).FirstOrDefault();
            if (info == null) { info = new Position() { Name = "" }; }
            return info;
        }

        public static string GetPositionNameByID(int id, List<Position> list)
        {
            Position info = list.Where(m => m.ID == id).FirstOrDefault();
            if (info == null) { return string.Empty; }
            return info.Name;
        }
    }
}
